import { Navigate, useRoutes } from 'react-router-dom'
import Main from "../layouts/layout.jsx";
import Homeview from "../view/home/home.jsx";
import Homeinfo from "../view/homeinfo/homeinfo.jsx";
import Busintrod from "../view/business_introduction/busintrod.jsx";
import NewsCenter from "../view/News_Center/newscenter.jsx";
import Expeanimal from "../view/experimental_animal/expeanimal.jsx";
import Entculture from "../view/enterprise_culture/enterprise_culture.jsx";
import Relatedmechan from "../view/Related_mechanisms/Relatedmechan.jsx";
import Personrecrui from "../view/personnel_recruitment/personrecrui.jsx";
import Connectus from "../view/connect_us/connectus.jsx";
const routes = ([
  {
    path: '/',
    element: <Navigate to="/home" />
  },
    {
        path: '/',  
        element: <Main />,  
        children: [
            {
                path: '/home',
                element: <Homeview />,
            },
            {
                path: '/homeinfo/',
                element:<Homeinfo />,
                children:[
                    {
                        path: 'busintrod',
                        element: <Busintrod />
                    },
                    {
                        path: 'NewsCenter',
                        element: <NewsCenter />
                    },
                    {
                        path: 'Expeanimal',
                        element: <Expeanimal />
                    },
                    {
                        path: 'Entculture',
                        element: <Entculture />
                    },
                    {
                        path: 'Relatedmechan',
                        element: <Relatedmechan />
                    },
                    {
                        path: 'Personrecrui',
                        element: <Personrecrui />
                    },
                    {
                        path: 'Connectus',
                        element: <Connectus />
                    },
                ]
            }
        ],
    },
])
export default routes;